<template>
    <div class="find-war">
        <div class="conent">
            <RouterLink to="/find/toplist">排行榜</RouterLink>
            <RouterLink to="/find/playlist">歌单</RouterLink>
            <RouterLink to="/find/djradio">主播电台</RouterLink>
            <RouterLink to="/find/album">新碟上架</RouterLink>
        </div>
    </div>
     <router-view></router-view>
    <el-carousel height="300px">
        <el-carousel-item v-for="item in imgs" :key="item">
            <img :src="item.img" alt="" width="100%">
        </el-carousel-item>
    </el-carousel>
    <el-row class="row-bg">
        <el-icon style="color: red;" size="20">
            <VideoPause />
        </el-icon>
        <el-col calss="topli" :span="3" style="font-size: 20px; font-weight: 700;">
            <RouterLink to="/find/toplist" style="text-decoration: none; color: black; padding-bottom: 10px;">排行榜
            </RouterLink>
        </el-col>
        <el-col :span="10">
            <a href="#" style="text-decoration: none; color: rgb(197, 197, 197);">华语</a>
            &nbsp;|<a href="#" style="text-decoration: none; color: rgb(197, 197, 197);">流行</a>

            &nbsp;|<a href="#" style="text-decoration: none; color: rgb(197, 197, 197);">摇滚</a>

            &nbsp; |<a href="#" style="text-decoration: none; color: rgb(197, 197, 197);">民谣</a>

            &nbsp; |<a href="#" style="text-decoration: none; color: rgb(197, 197, 197);">电子</a>
        </el-col>
    </el-row>
    <div class="grid-container">
        <!-- <el-image  v-for="(item, index) in images" :key="index" class="grid-item" :src="item.img" fit="cover">{{ item.name }} </el-image> -->
        <div v-for="(item, index) in images" :key="index" class="grid-item">
            <img :src="item.img" class="grid-image">
            <p class="grid-text">{{ item.name }}</p>
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            imgs: [
                { id: 101, img: 'http://p1.music.126.net/XjMRhuZjyL6HYCyAshpE5A==/109951169771948131.jpg' },
                { id: 101, img: 'http://p1.music.126.net/ivPXvyAIBBALPRQu3RLTmA==/109951169771984804.jpg' },
                { id: 101, img: 'http://p1.music.126.net/ylPpzZBdJxcdjyMoDXIPOA==/109951169772020545.jpg' }
            ],
            images: [
                { name: '华语民谣 I 孤独的心诠释诗意和远方', img: 'http://p1.music.126.net/UDpjFEHmXInxGd_xMAI12w==/109951162811986419.jpg' },
                { name: '华语民谣 I 孤独的心诠释诗意和远方', img: "http://p1.music.126.net/sOWvFHC7alSUXHxmsTr1bQ==/109951163610820733.jpg" },
                { name: "国产HipHop从地下到地上", img: 'http://p1.music.126.net/t97_FTCUQsFJrh-gSE33_g==/109951167665585892.jpg' },
                { name: "何以为家2：身心的“病与治", img: "http://p2.music.126.net/P2_KiJOd8LeGelh0zEYHZw==/109951168141517779.jpg" },
                { name: '华语民谣 I 孤独的心诠释诗意和远方', img: 'http://p1.music.126.net/UDpjFEHmXInxGd_xMAI12w==/109951162811986419.jpg' },
                { name: '华语民谣 I 孤独的心诠释诗意和远方', img: "http://p1.music.126.net/sOWvFHC7alSUXHxmsTr1bQ==/109951163610820733.jpg" },
            ]
        }
    }
}

</script>
<style scoped>
.find-war {
    width: 100%;
    margin-top: 0;
    background-color: brown;
    height: 30px;

}

.find-war a {
    text-align: center;
    text-decoration: none;
    color: white;
    font-size: 13px;
    font-weight: 700px;
    margin: 7px 17px 0;
    padding: 0px 15px 2px 15px;
    height: 20px;
    display: inline-block;
    line-height: 20px;
    border-radius: 20px;
}

.find-war a:hover {
    background-color: rgb(113, 15, 15);
}

.find-war .router-link-active {
    background-color: brown;
}

.conent {
    margin-left: 150px;
}

.row-bg {
    margin-top: 15px;
    border-bottom: 3px solid rgb(193, 8, 8);
    margin-left: 15px;
}

.el-icon {
    margin-right: 5px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 10px;
    justify-items: center;
    align-items: center;
    height: 160px;
    /* 根据需要调整 */
    /* width: 100%; */
    /* 根据需要调整 */
    margin-left: 10px;
    margin-top: 10px;
    margin-bottom: 60px;
}

.grid-item {
    text-align: center;
    /* object-fit: cover; 确保图片保持比例并填充整个容器 */
}

.grid-image {
    height: 160px;
    width: 160px;
}
</style>